Scroll to navigation

MKFS.BTRFS(8) System Manager's Manual MKFS.BTRFS(8)

NAME

mkfs.btrfs - create a btrfs filesystem

SYNOPSIS

mkfs.btrfs [ -A alloc-start ] [ -b byte-count ] [ -d data-profile ] [ -l leafsize ] [ -L label ] [ -m metadata profile ] [ -M mixed data+metadata ] [ -n nodesize ] [ -s sectorsize ] [ -r rootdir ] [ -K ] [ -h ] [ -V ] device [ device ... ]

DESCRIPTION

mkfs.btrfs is used to create a btrfs filesystem (usually in a disk partition, or an array of disk partitions). device is the special file corresponding to the device (e.g /dev/sdXX ). If multiple devices are specified, btrfs is created spanning across the specified devices.

OPTIONS

Specify the offset from the start of the device to start the btrfs filesystem. The default value is zero, or the start of the device.
Specify the size of the resultant filesystem. If this option is not used, mkfs.btrfs uses all the available storage for the filesystem.
Specify how the data must be spanned across the devices specified. Valid values are raid0, raid1, raid10 or single.
Specify the leaf size, the least data item in which btrfs stores data. The default value is the page size.
Specify a label for the filesystem.
Specify how metadata must be spanned across the devices specified. Valid values are raid0, raid1, raid10 or single.
Mix data and metadata chunks together for more efficient space utilization. This feature incurs a performance penalty in larger filesystems. It is recommended for use with filesystems of 1 GiB or smaller.
Specify the nodesize. By default the value is set to the pagesize.
Specify the sectorsize, the minimum block allocation.
Specify a directory to copy into the newly created fs.
Do not perform whole device TRIM operation by default.
Print the mkfs.btrfs version and exit.

AVAILABILITY

mkfs.btrfs is part of btrfs-progs. Btrfs is currently under heavy development, and not suitable for any uses other than benchmarking and review. Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for further details.

SEE ALSO

btrfsck(8)